<!DOCTYPE html 
	PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>edit: <?= htmlspecialchars($this->title) ?></title>
	<link rel="stylesheet" type="text/css" href="<?php echo $path ?>SimpleRecord.css" />
	<script type="text/javascript" src="<?php echo $path ?>mootools.v1.1.js"></script>
	<script type="text/javascript" src="<?php echo $path ?>SimpleRecord.js"></script>
</head>

<body>

<div class="section">
	<h1>edit: <?php echo htmlspecialchars($this->title) ?></h1>
	<a href="<?php echo basename($_SERVER['PHP_SELF']) ?>" class="func_link">index</a>
</div>

<form method="post" action="<?php echo basename($_SERVER['PHP_SELF']) ?>" onsubmit="return editSubmitted(this)">
	<fieldset>
		<textarea id="page_content" name="content" rows="15" cols="100" <?php echo $readonly ?>><?php echo htmlspecialchars($pageContent) ?></textarea>
	</fieldset>

	<fieldset>
		<input type="submit" value="Finish" <?php echo $disabled ?> />
		<input type="reset" value="Reset" onclick="return confirm('Do you want to revert really?');" />

		<script type="text/javascript">
		// <![CDATA[
		document.write('<input type="button" value="Preview" onclick="return editPreview($(\'page_content\').value, \'preview\')" />');
		// ]]>
		</script>
	</fieldset>
</form>


<script type="text/javascript">
// <![CDATA[
document.write('<div id="preview"></div>');
// ]]>
</script>

</body>
</html>